﻿@{
    ViewBag.Title = "SystemLog";
    Layout = "~/Views/Shared/_Layout.cshtml";
    var grid = new WebGrid(source: ViewBag.data, canSort: true, canPage: true, rowsPerPage: 10);
}
  





<div id="content" class="roundedBorders">
			<!-- Title -->
			<div id="title" class="b2">
				<h2>Log</h2>
				<!-- TitleActions -->
				<div id="titleActions">
					<!-- ListSearch -->
					 @using (Html.BeginForm("ResultFtpAccount", "Ftp", FormMethod.Get))
                     {
					<div class="listSearch actionBlock" style="padding:20px; margin-bottom:15px">
                     
						<div class="search">
							<label for="search">Recherche</label>
                              @Html.TextBox("name","" , new { @class = "text", @style = "height:20px" })
							@*<input style="height:30px" type="text" name="search" id="search" class="text" />*@
						</div>
						<div class="submit">
							    <button type="submit" id="search-button" class="button"><strong><img src="@Url.Content("~/Content/Admin/home/images/search_4.png")" alt="comments" class="icon " /></strong></button>
						</div>
 
                     </div>
                     }
					<!-- /ListSearch -->
				</div>
				<!-- /TitleActions -->
			</div>
			<!-- Title -->
			<!-- Inner Content -->
			<div id="innerContent">
				<!-- ListHeader -->
				
				<!-- /ListHeader -->

				<!-- ListTable -->
            
				@grid.GetHtml(tableStyle: "listTable", headerStyle: "first", columns: grid.Columns(

                  grid.Column("LogID", "ID"),
                  grid.Column("LogText", "Action"),
                  grid.Column("Date", "Log Date"),



                                                          grid.Column("aa", header: "", style: "text-align-center", format: (item) => new HtmlString(Html.ActionLink("Delete", "Delete", new { id = item.LogID }, new { onclick = "return confirm('Are you sure you wish to delete this log?');" }).ToString()))

                ))
                    
            @{
                if (!string.IsNullOrWhiteSpace(grid.SortColumn))
                {
                   <script type="text/javascript">
                       $('thead > tr > th > a[href*="sort=@grid.SortColumn"]').parent().append('@(grid.SortDirection == SortDirection.Ascending ? "^" : "v")');
                   </script>
                }
            }
				            <!-- /ListTable -->

            <div>
            </div>
				

				
		</div>
</div>

		